package com.Jshop.common.utils;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;


/**
 * @Description 线程池公共类
 * @Param
 * @return
 * @Date  2021/11/15
 **/


public final class MultiThreadUtils {

    public static ExecutorService executor = Executors.newCachedThreadPool();

    //适合任务量密集型任务
    //线程池状态随着任务增加而增加
    public static void toCacheThreadPool(Runnable task){
        executor.execute(task);
    }


}
